<%= form_for(product) do |f| %>
  <% if product.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(product.errors.count, "error") %> prohibited this product from being saved:</h2>

      <ul>
      <% @product.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.hidden_field :auction_id %>
    <%= f.hidden_field :user_id %>
    <%= f.label :name %> 
    <%= f.text_field :name %>
  </div>

  <div class="field">
    <%= f.label :item_type %> 
    <%= f.text_field :item_type %>
  </div>
  <div class="field">
    <%= f.label :isnew %> 
    <%= f.text_field :isnew %>
  </div>
    <%= f.hidden_field :sold_out %>
  <div class="field">
    <%= f.label :madein %> 
    <%= f.text_field :madein %>
  </div>
  <div class="field">
    <%= f.label :quantity %> 
    <%= f.number_field :quantity %>
  </div>
  <div class="field">
    <%= f.label :hinhanh %> 
    <%= f.text_field :img %>
  </div>
  <div class="field">
    <%= f.label :hope_price %> 
    <%= f.number_field :hope_price %>
  </div>
    <div class="field">
      <%= f.label :max_price %> 
      <%= f.number_field :max_price %>
    </div>
    <div class="field">
      <%= f.label :min_price %> 
      <%= f.number_field :min_price %>
    </div>
    <div class="field">
      <%= f.label :description %> 
      <%= f.text_area :description %>
    </div>
    <div class="field">
      <%= f.label :"Hình ảnh mô tả" %>
      <%= f.file_field :data %>
    </div>

    <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
